#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    void (Widget::*Signal_p)(QString) = &Widget::mySignal;
    void (Widget::*Slot_p)(QString) = &Widget::mySlots;

    connect(this,Signal_p,this,Slot_p);

    emit mySignal("有参");
}

Widget::~Widget()
{
    delete ui;
}

void Widget::mySlots()
{
    qDebug() << "无参信号";
}

void Widget::mySlots(QString str)
{
    qDebug() << str << "信号";
}
